-- GENERATED SPELL FOR [Auchenai Necromancer] --


function spell0_18702(pUnit, Event) --@Drain Soul,Drain--
pUnit:FullCastSpellOnTarget(35839,pUnit:GetRandomPlayer(0))
pUnit:RegisterEvent('Sorts_18702', 5000, 1)
end

function spell1_18702(pUnit, Event) --@Shadow Mend,Self--
pUnit:FullCastSpellOnTarget(33325,pUnit)
pUnit:RegisterEvent('Sorts_18702', 2000, 1)
end

function Sorts_18702(pUnit, Event)
local choix_sorts_18702 = math.random(0, 1)
if choix_sorts_18702 == 0 then
pUnit:RegisterEvent('spell0_18702', 1, 1)
end
if choix_sorts_18702 == 1 then
pUnit:RegisterEvent('spell1_18702', 1, 1)
end
end

function mob18702_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18702', math.random(1500, 3000), 1)
end

function mob18702_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18702_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18702_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18702, 1, 'mob18702_Action')
RegisterUnitEvent(18702, 2, 'mob18702_Leave')
RegisterUnitEvent(18702, 3, 'mob18702_Kill')
RegisterUnitEvent(18702, 4, 'mob18702_Die')
